﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Medianamik.Core.DAL.SQL
{
    public class Parameter : IParameter
    {
        public string Name { get; private set; }
        public object Value { get; private set; }
        public Parameter(string pName, object pValue)
        {
            Name = pName;
            Value = ProcessParameterValue(pValue);
        }

        private object ProcessParameterValue(object pParameterValue)
        {
            if (pParameterValue is Guid)
            {
                return pParameterValue.ToString();
            }
            return pParameterValue;
        }

    }
}
